package java6681.lesson13;

/**
 * @author Junichiro
 * @description 从Thread类继承创建线程任务类
 * @date 2021-06-05 18:56
 **/

public class TicketThread6681 extends Thread{
    private int tickets = 0;

    public TicketThread6681(String name) {
        super(name);
    }

    @Override
    public void run() {
        while (tickets <= 8){
            System.out.println(getName() + "已售出第" + tickets++ + "张票");
        }
    }
}
